import Button from "../Button";
import './index.css'
const Sort = ({sortKey,onSort,children,activeSortKey}) => {
    console.log('Sort=======props',sortKey,onSort,children,activeSortKey)
    return(
       <Button className={sortKey === activeSortKey ? 'activeSort' : 'sort'} onClick={()=> onSort(sortKey)}>
           {children}
       </Button>
    )
}

export  default Sort